﻿
using System;

namespace Language
{
    class Program
    {
        static void Main(string[] args)
        {
            //常量
            const double PI = 3.14;

            int r = 2;

            Console.WriteLine("圆的面积为:" + PI * r * r);


            //单一条的if语句运用
            int x = 3;

            if (x > 2)
            {
                Console.WriteLine("nice!");
            }

            //二选一if语句运用
            int year = 2020;

            if (year % 4 == 0 && year % 100 != 0 || year % 400 == 0)
            {
                Console.WriteLine("是闰年");
            }
            else
            {
                Console.WriteLine("是平年");
            }

            //多选一条件的if语句运用
            Console.WriteLine("请输入你的成绩:");

            float score = float.Parse(Console.ReadLine());

            if (score >= 90)
            {
                Console.WriteLine("优秀");

            }
            else if (score <= 85)
            {

                Console.WriteLine("良好");

            }
            else if (score <= 60)

            {
                Console.WriteLine("回家种田吧");
            }

            //switch case 语句 
            Console.WriteLine("请输入你的成绩:");
            float points = float.Parse(Console.ReadLine());
            switch (points / 10)
            {
                case 10:
                    Console.WriteLine("优秀");
                    break;
                case 9:
                    Console.WriteLine("良好");
                    break;
                case 8:
                    Console.WriteLine("再努力一下");
                    break;
                case 7:
                    Console.WriteLine("才及格不行啊");
                    break;
                default:
                    Console.WriteLine("想回家种田？");
                    break;
            }

        }
    }
}
